<?php

class Buyback_Resource_Offer_OfferPrice {
	
	public $Offer = 0;
	public $Source = null;
	
	public function __construct(array $options = array()){
		foreach($options as $source => $offer){
			$this->Offer = $this->Offer<$offer?$offer:$this->Offer;
		}
		$this->Source = array_search($this->Offer, $options);
	}
	
	public function setOfferPrice($offer){
		$this->Offer = $offer;
	}
	
	public function getOfferPrice(){
		return $this->Offer;
	}
	
	public function setOfferPriceSource($source){
		$this->Source = $source;
	}
	public function getOfferPriceSource(){
		return $this->Source;
	}
}